
import axios from "~/axios";
import { queryFilters } from "~/composables/util"

// 获取标签类型
export function getLabelTypeList({ ...data }) {
    let r
    if(data != {}){
        r = queryFilters(data)
    }else{
        r = ''
    }
    return axios.get(`/system/label_type/${r}`)
}

// 新增标签类型
export function postLabelType(data) {
    return axios.post(`/system/label_type/`, data)
}

// 编辑标签类型
export function putLabelType(id, data) {
    return axios.put(`/system/label_type/${id}/`, data)
}

// 修改标签类型
export function patchLabelTypeStatus(id, status) {
    return axios.patch(`/system/label_type/${id}/`, { status })
}
// 删除标签类型
export function deleteLabelType(id) {
    return axios.delete(`/system/label_type/${id}/`)
}